<template>
  <system-index @menu-change="menuChange" :has-login="false">
    <home ref="sysComp" @to-page="toPage"></home>
  </system-index>
</template>

<script>
  import SystemIndex from 'views/systemIndex';
  import Home from 'views/home';

  import mpMixins from '../mpMixins';
  import mainPageMixins from '../mainPageMixins';

  export default {
    mixins: [mpMixins, mainPageMixins],

    data() {
      return {
        pageType: 'circle',
        spaceId: null
      };
    },

    created() {
      window.pageName = 'home';

      window.resetCircleZoneById = circleZone => {
        this.$refs['sysComp'].resetCircleZoneById(circleZone);
      };

      window.resetCircleZoneLogById = logData => {
        this.$refs['sysComp'].resetCircleZoneLogById(logData);
      };

      window.resetCircleZoneLog = spaceId => {
        this.spaceId = spaceId;
      };
    },

    components: {
      SystemIndex,
      Home
    }
  };

</script>
